import { defineStore } from 'pinia'
import { ref } from "vue"
export const useBinanceStore = defineStore(
    'binance',
    () => {
        let walletAddress = ref('')
        const setWalletAddress = (data) => {
            walletAddress.value = data
        }

        let binanceNodeInfo = ref(null)
        const setBinanceNodeInfo = (data) => {
            binanceNodeInfo.value = data
        }

        return {
            walletAddress,
            setWalletAddress,
            binanceNodeInfo,
            setBinanceNodeInfo
        }
    },
    // TODO: 持久化
    {
        // 网页端的配置
        // persist: true,
        persist: {
            storage: sessionStorage,
        }
    },
)